/// Coder: Jose Ricardo Mello Viana - 2008
/// Bugs? e-mail me: zezim.ricardo@gmail.com

/*
 * texObj.h
 *
 *  Created on: 09/11/2008
 *      Author: zezim
 */

#ifndef __TEXOBJ__H__
#define __TEXOBJ__H__

#include <iostream>
#include <vector>

#include "glslKernel.h"
#include "geomTypes/geomTypes.h"

#include <GL/glut.h>

using namespace std;

typedef float              Number;
typedef Point<2, Number>   Point2;

class TexObj {
public:
   TexObj();
   TexObj(GLuint t, vector< pair<int, Point2> > c, int w, int h, int ct);

   virtual ~TexObj();

   void setTex(GLuint t) { tex = t; };
   void setCoords(vector< pair<int, Point2> > c) { coords = c; };
   void reduceCount() { count--; };

   GLuint getTex() { return tex; };
   vector< pair<int, Point2> > getCoords() { return coords; };
   int getWidth() { return width; };
   int getHeight() { return height; };
   int getCount() { return count; };
   bool isInverted() { return inverted; };

private:
   GLuint tex;
   vector< pair<int, Point2> > coords;
   int width, height;
   int count;
   bool inverted;
};

#endif /* __TEXOBJ__H__ */
